#ifndef PAGESWITCHCONTAINER_H
#define PAGESWITCHCONTAINER_H

#include <QWidget>
#include <QVector>
#include <QMouseEvent>
#include <QPaintEvent>
#include <QLabel>
#include <QGraphicsOpacityEffect>
#include <QParallelAnimationGroup>
#include <QSequentialAnimationGroup>
#include <QPropertyAnimation>

#include "BPageSwitch.h"

class BPageSwitchContainer : public QWidget
{
    Q_OBJECT
public:
    BPageSwitchContainer(QWidget* parent = nullptr);
    ~BPageSwitchContainer();

private:
    int m_pageNum = 0, m_centerPageID = -1;
    QVector<BPageSwitch*> m_page;
    QSize m_centerSize = QSize(1280, 720);
    QSize m_elseSize = QSize(200, 200);
    QPoint m_centerPoint = QPoint(0, 50);
    QPoint m_elsePoint = QPoint(1300, 50);
    //所有界面的大小
    QVector<QPoint> m_point;
    QVector<QSize> m_size;

    QGraphicsOpacityEffect* m_opacity;    //透明度

public:
    void addPage(BPageSwitch* page);
    int pageNum() const { return m_pageNum;}
    int centerPageID() const {return m_centerPageID;}

public slots:
    void setCenterPage(int pageID);

};

#endif // PAGESWITCHCONTAINER_H
